package rrrmai.di.module;

import com.xgggh.rrrmai.BuildConfig;

import javax.inject.Named;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
import retrofit2.Retrofit;
import rrrmai.service.APIService;
import rrrmai.service.APIServiceImpl;


/**
 * Created by summer on 2018/2/9.
 */


@Module
@SuppressWarnings("unused")
public class ApiModule {

    public ApiModule(){
    }

    @Provides
    //@Singleton
    APIService provideAPIService(Retrofit retrofit) {
        return new APIServiceImpl(retrofit);
    }

    @Provides
    //@Singleton
    @Named("backend")
    public String provideBackend() {
        return BuildConfig.domain;
    }

}

